package dreampack.tool;

public class ConvertTool {
    public ConvertTool() { }
    public static int SafeGetInt(Object oValue, int nDefault) {
        int nReturn = nDefault;
        if (null != oValue) {
            try {
                nReturn = Integer.parseInt(String.valueOf(oValue));
            } catch (Exception e){
                nReturn = nDefault;
            }
        }
        return nReturn;
    }
}
